import request from '@/utils/request'
// 获取Table数据
export function getTable(params) {
  return request({
    url: '/api/vm-service/sku/search',
    params
  })
}
// 商品搜索
export function searchGoods(params) {
  return request({
    url: '/api/vm-service/sku/search',
    params
  })
}
// 修改商品
export function xiugaiGoods(data) {
  return request({
    url: `/api/vm-service/sku/${data.skuId}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 新增数据
export function addGoods(data) {
  return request({
    url: `/api/vm-service/sku`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 商品类型
export function shangpingleixing() {
  return request({
    url: `/api/vm-service/skuClass/search`,
    params: {
      pageIndex: 1,
      pageSize: 100000
    }
  })
}
// 文件上传
export function upload(data) {
  return request({
    url: `/api/vm-service/sku/upload`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

